package com.itheima.features.stream;

import java.io.Serializable;
import java.util.stream.Stream;

public class StreamDemo01 {

    public static void main(String[] args) {

        Stream<? extends Serializable> stream = Stream.of("蓝湛", 15);
        stream.forEach(s -> System.out.println(s));

        String s = null;
        Stream<String> s1 = Stream.of(s);
        System.out.println(s1);
        s1.forEach(s2 -> System.out.println(s2));

        String s2 = null;
        Stream<String> s3 = Stream.ofNullable(s2);
        s3.forEach(s4 -> System.out.println(s4));

    }
}
